
package petrivis.model;

import prefuse.data.Table;

/**
 * Represents the structure for the Nodes of the Petri Net (Transitions and Places)
 * @author Jorge Munoz
 */
public class Nodes extends Table{

    /**
     * Creates a new structure for the Nodes of the Petri Net
     */
    public Nodes(){
        //Create a empy Table
        super();

        //Add the columns for each field of the Nodes
        // General Node attributes
        addColumn(PetriNet.NAME_COL, String.class);
        addColumn(PetriNet.PLACE_COL, boolean.class);
        //Place Node attributes
        addColumn(PetriNet.CAP_COL, Integer.class);
        addColumn(PetriNet.INI_MAR_COL, Integer.class);
        addColumn(PetriNet.MAR_COL,Integer.class);

        //Create a Index over the Name field
        index(PetriNet.NAME_COL);
    }

}
